package com.bfly.mall.product.dto;

import com.bfly.core.config.ResourceConfigure;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 多规格商品SKU列表
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/9/15 21:22
 */
public class ProductSkuListDTO implements Serializable {

    private static final long serialVersionUID = -1407122584423089579L;
    private int id;
    private int productId;
    private String sn;
    private String title;
    private String speAttrValue;
    private String img;
    private BigDecimal originalPrice;
    private BigDecimal price;
    private BigDecimal vipPrice;
    private int stock;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUrl() {
        return StringUtils.isNotBlank(getImg()) ? ResourceConfigure.getResourceHttpUrl(getImg()) : "";
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSpeAttrValue() {
        return speAttrValue;
    }

    public void setSpeAttrValue(String speAttrValue) {
        this.speAttrValue = speAttrValue;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public BigDecimal getOriginalPrice() {
        return originalPrice;
    }

    public void setOriginalPrice(BigDecimal originalPrice) {
        this.originalPrice = originalPrice;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getVipPrice() {
        return vipPrice;
    }

    public void setVipPrice(BigDecimal vipPrice) {
        this.vipPrice = vipPrice;
    }

    public int getStock() {
        return stock;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }
}
